home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / tclX-6.4 / help / lists / lrange < prev    next >
Encoding:
Text File  |  1992-12-17  |  980 b   |  16 lines

  1.           lrange list first last
  2.                List  must  be  a  valid  Tcl  list.  This command will
  3.                return a new list consisting of elements first  through
  4.                last,  inclusive.  Last may be end (or any abbreviation
  5.                of it) to refer to the last element of  the  list.   If
  6.                first  is  less  than zero, it is treated as if it were
  7.                zero.  If last is greater than or equal to  the  number
  8.                of  elements  in  the list, then it is treated as if it
  9.                were end.  If first is greater than last then an  empty
  10.                string  is returned.  Note: ``lrange list first first''
  11.                does not always produce the  same  result  as  ``lindex
  12.                list  first'' (although it often does for simple fields
  13.                that aren't enclosed  in  braces);  it  does,  however,
  14.                produce exactly the same results as ``list [lindex list
  15.                first]''
  16.